package com.yq.reggie.controller;

import com.yq.reggie.pojo.Orders;
import com.yq.reggie.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrdersService ordersService;
    /**
     * 支付
     * @param orders
     * @return
     */
    @PostMapping("/submit")
    public Result submit(@RequestBody Orders orders){
        ordersService.submit(orders);
        return Result.success("提交成功");
    }
}
